// ==============================
// Mobile Navbar
// ==============================

.mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: $mobile-navbar-height;
  background: $white;
  box-shadow: 0px 2px 2px $gray;
  text-align: center;
  transition: transform 300ms ease;
  z-index: 99;

  &.fixed-open {
    transform: translate3d(180px, 0px, 0px);
  }

  .mobile-header-logo {
    display: inline-block;
    margin-right: 50px;

    .logo {
      font-size: 22px;
      line-height: $mobile-navbar-height;
      font-family: $logo-font-family;
    }
  }

  .mobile-navbar-icon {
    color: $theme-color;
    height: $mobile-navbar-height;
    width: $mobile-navbar-height;
    font-size: 24px;
    text-align: center;
    float: left;
    position: relative;
    transition: background 0.5s;

    @include mobile-menu-icon();
  }
}

.mobile-menu {
  background-color: rgba($deputy-color, 0.5);

  .mobile-menu-list {
    position: relative;
    list-style: none;
    margin-top: 50px;
    padding: 0;
    border-top: 1px solid $deputy-color;

    .mobile-menu-item > a {
      padding: 10px 30px;
      display: block;
      border-bottom: 1px solid $deputy-color;
    }

    a {
      font-size: 18px;
      font-family: $global-serif-font-family;

      &:hover {
        color: $theme-color;
      }
    }
  }
}

// mobile sub-menu style
.mobile-menu-parent {
  position: relative;
  border-bottom: 1px solid $deputy-color;

  a {
    margin-right: 40px;
    display: block;
    padding: 10px 0 10px 30px;
    display: block;
  }

  .mobile-submenu-open {
    width: 40px;
    height: 100%;
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    border-left: 1px solid $deputy-color;

    &:before {
      content: '';
      border-right: 2px solid;
      border-bottom: 2px solid;
      display: inline-block;
      width: 7px;
      height: 7px;
      transform: rotate(-45deg);
      margin-bottom: -5px;
      position: absolute;
      bottom: 50%;
      right: 18px;
    }
  }
}

.mobile-submenu-show > .mobile-submenu-open:before {
  transform: rotate(45deg);
}

.mobile-submenu-list {
  display: none;
  padding-left: 1em;
  border-bottom: 1px solid $deputy-color;
  list-style: none;

  li > a {
    display: block;

    &:before {
      content: '- '
    }
  }
}

@include max-screen() {
  .mobile-navbar {
    display: block;
  }
}

.mobile-menu-item-lang .icon-globe::before {
  font-size: 0.9em;
}
